<?php $izdelkiHelper = $this->getHelper('Izdelki'); ?>
<div id="view-content">
	<?php $izdelki = $izdelkiHelper->getIzdelki(); ?>
	<table id="izdelki-grid" class="table">
		<tr>
			<th>Thumbnail</th><th>ID izdelka</th><th>Ime izdelka</th><th>Cena</th><th>Zaloga</th><th>Akcije</th>
		</tr>
		<?php foreach ($izdelki as $izdelek): ?>
			<tr>
				<td><img src="<?php echo $this->baseUrl() ."/". $izdelek->getThumbNail() ?>" width="80" height="80" /></td>
				<td><?php echo $izdelek->getIdProdukt() ?></td>
				<td><?php echo $izdelek->getIme() ?></td>
				<td><?php echo $izdelek->getCena() ?></td>
				<td><?php echo $izdelek->getZaloga() ?></td>
				<td>
					<a href="<?php echo $izdelek->getEditUrl($this->baseUrl()) ?>">Uredi</a> |
					<a href="<?php echo $izdelek->getDeleteUrl($this->baseUrl()) ?>">Izbriši</a> |
					<?php if ($izdelek->getAktiviran()): ?>
						<a href="<?php echo $izdelek->getDeactivateUrl($this->baseUrl()) ?>">Deaktiviraj</a>
					<?php else: ?>
						<a href="<?php echo $izdelek->getActivateUrl($this->baseUrl()) ?>">Aktiviraj</a>
					<?php endif; ?>
				</td>
			</tr>
		<?php endforeach; ?>
	</table>

	<div class="button-set">
		<a class="button" href="<?php echo $this->url(array('action' => 'add-product')) ?>">Dodaj nov artikel</a>
	</div>
</div>